#include <iostream>

using namespace std;

int main()
{
    char s[100] = " I like ,,,.. C++ programming!";
    char y[100] = {0};
    int j = 0;
    for(int i = 0;s[i]!='\0';i++){
		if(s[i]!=' '&&s[i]!=','&&s[i]!='.'&&s[i]!='?'&&s[i]!='!'){
			y[j] = s[i];
			if(s[i+1]==' '||s[i+1]==','||s[i+1]=='.'||s[i+1]=='?'||s[i+1]=='!'){
				j++;
				y[j] = '\n';
			}
			j++;
		}
    }
    cout<<y;
    return 0;
}

